package com.ilink.teacherservice.controller.Screen;

import com.ilink.teacherservice.service.Screen.ScreenDataInsert;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("/teacher")
public class ScreenDataController {

    @Autowired
    private ScreenDataInsert screenDataInsert;

    /**
     * 无参接口调用 insertCourseData 方法以测试数据插入
     * @return 返回操作成功信息
     */
    @GetMapping("/insertCourseData")
    public String insertCourseData() {
        screenDataInsert.insertCourseData();
        return "Course data inserted successfully";
    }
}
